syntax = "proto3";

package spqr;

option go_package = "spqr/proto";


import "protos/router.proto";

service TopologyService {
  rpc OpenRouter(OpenRouterRequest) returns (OpenRouterReply) {}
  rpc GetRouterStatus(GetRouterStatusRequest) returns (GetRouterStatusReply) {}
  rpc CloseRouter(CloseRouterRequest) returns (CloseRouterReply) {}
  rpc UpdateCoordinator(UpdateCoordinatorRequest) returns (UpdateCoordinatorResponse) {}
  rpc GetCoordinator(GetCoordinatorRequest) returns (GetCoordinatorResponse) {}
}

message OpenRouterRequest {}

message OpenRouterReply {}

message CloseRouterRequest {}

message CloseRouterReply {}

message GetRouterStatusRequest {}

message GetRouterStatusReply {
  RouterStatus status = 1;
}

message UpdateCoordinatorRequest {
  string address = 1;
}

message UpdateCoordinatorResponse {}

message GetCoordinatorRequest {}

message GetCoordinatorResponse {
  string address = 1;
}